﻿using DevExpress.Utils;

namespace Marmat.Forms.Views
{
    namespace Grid
    {
        public class RowCellStyleEventArgs : GridEventArgs
        {
            internal DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs info;

            internal RowCellStyleEventArgs(BaseGrid GridControl, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs info) : base(GridControl)
            {
                this.info = info;
            }

            /// <summary>
            /// 获取用于绘制当前处理的数据单元格的外观设置。
            /// </summary>
            /// <returns></returns>
            public AppearanceObject Appearance
            {
                get
                {
                    return this.info.Appearance;
                }
            }

            /// <summary>
            /// 获取当前处理单元格对应的列。
            /// </summary>
            /// <returns></returns>
            public Column Column
            {
                get
                {
                    return (Column)this.info.Column.Tag;
                }
            }
            /// <summary>
            /// 获取包含已处理单元格的行号
            /// </summary>
            /// <returns></returns>
            public int RowHandle
            {
                get
                {
                    return this.info.RowHandle;
                }
            }

            /// <summary>
            /// 返回当前处理的单元格值。
            /// </summary>
            /// <returns></returns>
            public object CellValue
            {
                get
                {
                    return this.info.CellValue;
                }
            }
        }
    }
}